package cn.diancan.service;

import java.util.List;

import cn.diancan.exception.OutMsgException;
import cn.diancan.model.Product;
import cn.diancan.vo.model.ProductVo;
import cn.diancan.vo.model.SpecificationVo;
import cn.diancan.vo.other.Pager;


public interface ProductService {
    
     
    /**
     * 有数据源使用
     * @param goodsId
     * @param specificationValueId
     * @param barcode
     * @param tagPrice
     * @param retailPrice
     * @param stockCount
     * @return
     * @throws OutMsgException
     */
    @Deprecated
    public boolean saveProduct(Long goodsId,Long[] specificationValueId,String barcode,Double tagPrice,Double retailPrice,Integer stockCount)throws OutMsgException,Exception;
     
    @Deprecated
    public boolean saveProductList(Long goodsId,Long[] sizeSpecificationValueIds,Long[] colorSpecificationValueIds) throws OutMsgException,Exception;
    
    
    
    public boolean saveColorAndSizeProduct(Long goodsId,Long colorSpecificationValueId,Long sizeSpecificationValueId,String barcode,Integer stockCount,boolean isVerify)throws OutMsgException,Exception;
    
    
    public boolean saveColorAndSizeProductList(Long goodsId,Long[] sizeSpecificationValueIds,Long[] colorSpecificationValueIds)throws OutMsgException,Exception;
    
    
    public Product findByProductBarcode(String barCode)throws OutMsgException;
    
    
    public List<Product> findProductListByGoodsId(Long goodsId)throws OutMsgException;
    
    
    public Product findByProductId(Long productId)throws OutMsgException;
    
    
    public List<ProductVo> findProductVoListByGoodsId(Long goodsId)throws OutMsgException;


    public ProductVo findVoByProductId(Long productId) throws OutMsgException;

    
    public Pager findProductVoPager(Pager pager) throws OutMsgException;




    
    /**
     * 数据源 --定期可以在这里获取数据
     * @param pageNo
     * @param row
     * @return
     * @throws Exception 
     * @throws OutMsgException 
     */
    public List<ProductVo> findVoList(Long timeStemp, Integer pageNo,Integer row) throws OutMsgException, Exception;


    public List<ProductVo> findProductVoList(String goodsNumber, Integer pageNo, Integer row) throws OutMsgException, Exception;

    /**
     * 数据源 根据条码获取商品信息
     * @param barcode
     * @return
     */
    public ProductVo findVoByBarcode(String barcode);
    
    
    public ProductVo findProductVo(String goodsNumber,Long colorSpecificationValueId,Long sizeSpecificationValueId);

    
    public List<SpecificationVo> findColorSpecificationValueByGoodsNumber(String goodsNumber);
    
    
    public List<SpecificationVo> findSizeSpecificationValueByGoodsNumber(String goodsNumber);
    
    
    public Long findCount(Long brandId);
    
    

}
